home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / koChart.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-30  |  2.4 KB  |  88 lines

  1. /* This file is part of the KDE project
  2.    Copyright (C) 2000-2002 Kalle Dalheimer <kalle@kde.org>
  3.  
  4.    This library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Library General Public
  6.    License version 2 as published by the Free Software Foundation.
  7.  
  8.    This library is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  11.    Library General Public License for more details.
  12.  
  13.    You should have received a copy of the GNU Library General Public License
  14.    along with this library; see the file COPYING.LIB.  If not, write to
  15.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  16.  * Boston, MA 02110-1301, USA.
  17. */
  18.  
  19. #ifndef __koffice_kchart_h__
  20. #define __koffice_kchart_h__
  21.  
  22. #include <qvariant.h>
  23.  
  24. #include <KoDocument.h>
  25. #include <KDChartTable.h>
  26.  
  27. #include <koffice_export.h>
  28.  
  29. namespace KoChart
  30. {
  31.     class Part;
  32.  
  33.     // KoChart::Value is either:
  34.     //  - a double (interpreted as a value)
  35.     //  - a QString (interpreted as a label)
  36.     //  - a QDateTime (interpreted as a date/time value)
  37.     //  - Invalid (interpreted as empty)
  38.     typedef QVariant         Value;
  39.     //typedef KDChartTableData Data;
  40.  
  41.     class KOCHARTINTERFACE_EXPORT WizardExtension : public QObject
  42.     {
  43.         Q_OBJECT
  44.     public:
  45.         WizardExtension( Part *part, const char *name = 0 );
  46.         virtual ~WizardExtension();
  47.  
  48.         Part *part() const { return m_part; }
  49.  
  50.         virtual bool show( QString &area ) = 0;
  51.         // XXX add more?
  52.  
  53.     private:
  54.         Part *m_part;
  55.         class WizardExtensionPrivate;
  56.         WizardExtensionPrivate *d;
  57.     };
  58.  
  59.     class KOCHARTINTERFACE_EXPORT Part : public KoDocument
  60.     {
  61.         Q_OBJECT
  62.     public:
  63.         Part( QWidget *parentWidget, const char *widgetName,
  64.               QObject *parent, const char *name,
  65.               bool singleViewMode = false );
  66.  
  67.         virtual ~Part();
  68.  
  69. #if 0
  70.     // The old interface.
  71.         virtual void setData( const Data &d ) = 0;
  72. #else
  73.     // The new interface.
  74.     virtual void resizeData( int rows, int columns ) = 0 ;
  75.     virtual void setCellData( int row, int column, const QVariant &) = 0;
  76.     virtual void analyzeHeaders( ) = 0;
  77. #endif
  78.         virtual void setCanChangeValue(bool b )=0;
  79.  
  80.         virtual WizardExtension *wizardExtension();
  81.     private:
  82.         class PartPrivate;
  83.         PartPrivate *d;
  84.     };
  85. }
  86.  
  87. #endif
  88.